#include "IVolumn.h"
#include "IDirProxyImpl.h"
#include "MyIDir.h"
#include "Helper.h"
///-----------------------------------------------------------------------------
IVolumn::IVolumn(const std::string& szVolumn)
: m_szVolumnName(szVolumn)
{
	Time Now;
	Helper::MyGetCurrentTime(Now);

	m_pRootDir = new IDirProxyImpl(szVolumn, Now);
	m_pCurrentDir = m_pRootDir;
}
///-----------------------------------------------------------------------------
IVolumn::~IVolumn(void)
{
	IDirProxyImpl* pIDirProxyImpl = dynamic_cast<IDirProxyImpl*>(m_pRootDir);
	safe_delete(pIDirProxyImpl);
}
///-----------------------------------------------------------------------------
IDirProxy* IVolumn::GetRootDir()
{
	return m_pRootDir;
}
///-----------------------------------------------------------------------------
IDirProxy* IVolumn::GetCurrentDir(void)
{
	return m_pCurrentDir;
}
///-----------------------------------------------------------------------------
const std::string& IVolumn::GetVolumnName(void) const
{
	return m_szVolumnName;
}
///-----------------------------------------------------------------------------
void IVolumn::SetCurrentDirPointer(IDirProxy* pIDirProxy)
{
	m_pCurrentDir = pIDirProxy;
}
///-----------------------------------------------------------------------------